<template>
	<web-view v-if='webviewSrc' :src="webviewSrc"></web-view>
</template>

<script>
import { ref } from 'vue';
import common from '@/base/common.js';
export default {
	onLoad(options) {
		const isPrivate = options.isPrivate === '1';
		this.isPrivate = isPrivate;
		// this.webviewSrc = common.agreementDomain + `/static/protocol/index.html?type=${isPrivate ? 'privacy' : 'user'}&terminal=mp`;
	},
	onReady() {
		uni.setNavigationBarTitle({
			title: this.isPrivate ? "隐私政策" : "用户协议",
		});
	},
	setup() {
		const webviewSrc = ref("");
		const isPrivate = ref();
		return {
			webviewSrc,
			isPrivate,
		};
	},
};
</script>

<style></style>
